import { LoginAndRegister } from "@/types/login";
import { request } from "umi";
// 获取验证码
export async function getCaptcha() {
  return request('/captchaImage', {
    method: 'GET',
  });
}
export async function register(data: LoginAndRegister) {
  return request('/register', {
    method: 'POST',
    data
  });
}
export async function login(data: LoginAndRegister) {
  return request('/login', {
    method: 'POST',
    data
  });
}

